package com.ruimei.entitys.enums;

import com.ruimei.util.CommUtil;

public enum WorkStatus
{
  JOB("在职"),  QUIT("离职"),  RETIRE("退休"),  OTHER("其它");
  
  private String name;
  
  public static WorkStatus values(String workStatus)
  {
    if (CommUtil.isEmpty(workStatus)) {
      return null;
    }
    switch (workStatus)
    {
    case "JOB": 
      return JOB;
    case "QUIT": 
      return QUIT;
    case "RETIRE": 
      return RETIRE;
    case "OTHER": 
      return OTHER;
    }
    return JOB;
  }
  
  public static WorkStatus value(Object workStatus)
  {
    return values(String.valueOf(workStatus));
  }
  
  private WorkStatus(String name)
  {
    this.name = name;
  }
  
  public String getName()
  {
    return this.name;
  }
  
  public void setName(String name)
  {
    this.name = name;
  }
  
  public static int valuesNum(String workStatus)
  {
    switch (workStatus)
    {
    case "JOB": 
      return 0;
    case "QUIT": 
      return 1;
    case "RETIRE": 
      return 2;
    case "OTHER": 
      return 3;
    }
    return 0;
  }
  
  public static WorkStatus values(int num)
  {
    switch (num)
    {
    case 0: 
      return JOB;
    case 1: 
      return QUIT;
    case 2: 
      return RETIRE;
    case 3: 
      return OTHER;
    }
    return null;
  }
  
  public static WorkStatus matching(String ch)
  {
    switch (ch)
    {
    case "在职": 
      return JOB;
    case "离职": 
      return QUIT;
    case "退休": 
      return RETIRE;
    case "其它": 
      return OTHER;
    }
    return JOB;
  }
}


/* Location:              E:\360MoveData\Users\admin\Desktop\teacher_wap-0.0.1-SNAPSHOT.jar!\BOOT-INF\classes\com\ruimei\entitys\enums\WorkStatus.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       0.7.1
 */